package com.example.hanchen.yongkanggy.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ToolsUtils {


    private static final Pattern PHONE_NUMBER_PATTERN = Pattern.compile("^1[3456789]\\d{9}$");


    /*获取当前系统的时间戳*/
    public static long getTimestamp() {
        long currentTimeMillis = System.currentTimeMillis();
        return currentTimeMillis;
    }


    /*手机号校验*/
    public static boolean isValidPhoneNumber(String phoneNumber) {
        Matcher matcher = PHONE_NUMBER_PATTERN.matcher(phoneNumber);
        return matcher.matches();
    }

}
